package com.caishi.lkx.exam.model;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.caishi.lkx.exam.vo.PkData;
import com.caishi.lkx.handler.PkDataListTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;


@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "pk_records")
public class PkRecords{
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime startTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime endTime;
    private String userId;
    private String userName;
    @TableField(typeHandler = PkDataListTypeHandler.class)
    private List<PkData> userPkData;
    private Integer score;

    private String otherId;
    private String otherName;
    @TableField(typeHandler = PkDataListTypeHandler.class)
    private List<PkData> otherPkData;
    private Integer otherScore;
    private String success;

    private String examId;
    private Boolean giveUp;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    private String sign;

    @TableField(exist = false)
    private String examName;
}
